long numFunctions = functionBytes/kNumFunctionsEntrySize;
long stackDepth = stackBytes/kStackDepthEntrySize;
if (numFunctions > mNumFunctions) {
sprintf(str, "numFunctions is too small. It should be %d.", numFunctions); // Profiling is often done in !RELEASE builds so we can't use TRACE or DEBUGSTR.
BreakStrToDebugger(str);
}
if (stackDepth > mStackSize) {
sprintf(str, "stackDepth is too small. It should be %d.", stackDepth);
BreakStrToDebugger(str);
}
OSErr err = ProfilerDump(StrToPStr(mFileName));
if (err != noErr)
BreakStrToDebugger("Got an error calling ProfilerDump");